package org.hfoss.POCT;

import android.content.Context;
import android.database.Cursor;


public class Building {
	public int building_index;
	public String building_name;
	public String building_description;
	public Context mContext;
	private MyDBHelper mDbHelper;
	public Cursor images = null;
	public Cursor videos = null;
	public Cursor audioClips = null;

	
	public Building(Context context) {
			mDbHelper = new MyDBHelper(context);
			mContext = context;
	}
	
	public Building (Context context, int id) {
		this(context);
		building_index = id;
		building_name = getName();
		building_description = getDescription();
		images = getImages();
		videos = getVideos();
		audioClips = getAudioClips();
		mContext = context;
	}
	public Cursor getAudioClips() {
		audioClips = mDbHelper.getAudiosCursor(this.building_index);
		return audioClips;
	}

	public Cursor getVideos() {
		videos = mDbHelper.getVideosCursor(this.building_index);
		return videos;
	}

	public Cursor getImages() {
		images = mDbHelper.getImagesCursor(this.building_index);
		return images;
	}

	public String getDescription() {
		building_description = mDbHelper.getDescription(this.building_index);
		return building_description;
	}

	public String getName(){
		building_name = mDbHelper.getName(this.building_index);
		return building_name;
	}
	

}
